
UI_DIR   = ./UI
BUILD_DIR = Build
MOC_DIR = $${BUILD_DIR}/moc
RCC_DIR = $${BUILD_DIR}/rcc
OBJECTS_DIR = $${BUILD_DIR}/obj

# 新增 Windows SDK 版本配置（需根据实际路径调整）
win32 {
    # 强制指定 Windows SDK 版本
    QMAKE_WINDOWS_TARGET_PLATFORM_VERSION = 10.0.22621.0
    DEFINES += WINVER=0x0A00 _WIN32_WINNT=0x0A00  # 设置 Windows 10 API 级别
}

greaterThan(QT_MAJOR_VERSION,4){
        TARGET_ARCH=$${QT_ARCH}
}else{
        TARGET_ARCH=$${QMAKE_HOST.arch}
}
win32 {
    CONFIG                 += release
    QMAKE_CXXFLAGS_RELEASE -= -O2
    QMAKE_CXXFLAGS_RELEASE += -Od -Zi -FS -MP
    QMAKE_CFLAGS_RELEASE = -Od -Zi -FS -MP
    QMAKE_LFLAGS_RELEASE += /DEBUG /OPT:REF /OPT:ICF

    # C++ 编译选项优化
    contains(TARGET_ARCH, x86_64){
        message(----win64 configure----$$PWD)
        DESTDIR = $$PWD/Bin

        QMAKE_CXXFLAGS += /source-charset:utf-8
        QMAKE_CXXFLAGS += /execution-charset:utf-8
        QMAKE_CXXFLAGS += /MP
        QMAKE_LFLAGS += /LARGEADDRESSAWARE
    }
    QMAKE_CLFAGS += -nologo -Zc:__cplusplus -permissive-
}

win32 {
    LIBS    += -lUser32
#    RC_FILE = logo.rc
    message(----win32 configure----$$PWD)
}
